package com.zh.note.demo.javaSE;

public class ExchangeDemo {
    public static void main(String[] args) {

        int a = 10;
        int b = 20;
        System.out.println("a = " + a + ", b = " + b);
        swap(a,b);
        System.out.println("a = " + a + ", b = " + b);

    }

    private static void swap(int a, int b) {
        int temp = a;
        a = b;
        b = temp;
        System.out.println("a = " + a + ", b = " + b);

    }
}
